package com.test;

import java.util.Arrays;

public class IntAry implements Comparable<IntAry> {
    private int[][] arr;

    public IntAry(int[][] arr) {
        this.arr = arr;
    }

    public int[][] getArr() {
        return arr;
    }

    @Override
    public int compareTo(IntAry o) {
        int[][] oArr = o.getArr();
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[0].length; j++) {
                if(arr[i][j] != oArr[i][j])
                    return -1;
            }
        }
        return 0;
    }

    @Override
    public String toString() {
        String str = "";
        for (int i = 0; i < 3; i++) {
            str += Arrays.toString(arr[i]);
        }
        return "IntAry{" +
                "arr=" + str +
                '}';
    }
}
